package s;

import java.util.Scanner;



public class Main201621123041 {
	public static void main(String args[]){
	@SuppressWarnings("resource")
	Scanner sc = new Scanner(System.in);
	System.out.println(isHw(sc.nextLine()));
	
	}

public static boolean isHw(String s){
	if(s.length()<=1)
		return true;
	else if(s.charAt(0)!=s.charAt(s.length()-1))
		return false;
	return isHw(s.substring(1,s.length()-1));
}

}

